package com.wpt.main.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wpt.main.service.ISdCardService;
import com.wpt.main.service.impl.SdCardService;
import com.wpt.main.util.XmlUtil;
import com.wpt.main.vo.FileObject;

/**
 *	获取右边显示内容文件列表
 *  @author   xinqh
 *  @Date	  2011-3-31  下午14:57:19
 */
public class RightFileListServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
       
	protected void operator(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
		String path = request.getParameter("path");
		String id = request.getParameter("id");
		ISdCardService ss = new SdCardService();
		List<FileObject> list = ss.getFileByPath(path, Integer.parseInt(id));
		String treeXml = XmlUtil.file2xml(list);
		
		response.getWriter().write(treeXml);
	}
	
}
